package infrastructure.exceptions;

/**
 * This exception should be thrown by the remote side, when there is some problem with logon mechanism 
 * @author sashas
 *
 */
public class LoginException extends BaseServerRuntimeException{

	/** username with which we failed to logon*/
	private String suppliedUserName;
	
	/** password with which we failed to logon*/
	private String suppliedPassword;
	
	
	public LoginException(String suppliedUserName, String suppliedPassword) {
		super();
		this.suppliedUserName = suppliedUserName;
		this.suppliedPassword = suppliedPassword;
	}
	
	public LoginException(String suppliedUserName, String suppliedPassword,Throwable cause) {
		super(cause);
		this.suppliedUserName = suppliedUserName;
		this.suppliedPassword = suppliedPassword;
	}

		
	public String getMessage() {
		return "Failure to logon with username '" + suppliedUserName + "' password '" + suppliedPassword + "'"; 
	}
}
